//
//  MobileVehicleRegPlates.h
//  LPlates.app
//
//  Created by Andreas Schwelling on 23.11.07.
//	http://www.andi.de/licenseplates/
//
//  Released under the GNU General Public License.
//  See LICENSE for details.
//
//  Use at your own risk.




#import <CoreFoundation/CoreFoundation.h>
#import <Foundation/Foundation.h>
#import <Layerkit/Layerkit.h>
#import <UIKit/CDStructures.h>
#import <UIKit/UIHardware.h>
#import <UIKit/UIApplication.h>
#import <UIKit/UIKit.h>
#import <UIKit/UIView.h>
#import <UIKit/UINavigationBar.h>
#import <UIKit/UIImage.h>
#import <UIKit/UIImageView.h>
#import <UIKit/UIImageView.h>
#import <UIKit/UISectionList.h>
#import <UIKit/UIDatePicker.h>
#import <UIKit/UISegmentedControl.h>
#import <UIKit/UISwitchControl.h>
#import <UIKit/UISearchField.h>
#import <UIKit/UIProgressBar.h>

#import "CountryList.h"
#import "CountryEditView.h"
#import "CountyList.h"
#import "DetailsView.h"
#import "Downloader.h"
#import "SearchView.h"


@class MobileVehicleRegPlates;




@interface MobileVehicleRegPlates : UIApplication {
	
	NSString *_appLibraryPath,*_appSettingsPath;
	
	UIWindow *mainWindow;
	UIView *mainView,*beforeDetailView;
	UINavigationBar *nav;
	UITransitionView *transitionView;
	
	UIAlertSheet *helpSheet,*updateSuccessSheet,*askupdateSheet,*updateSheet,*whatsSheet,*aboutSheet;
	UIProgressBar   *progressIndicator;
	CountryList *countryView;
	CountyList *countyView;
	DetailsView *detailView;
	SearchView *searchView;
	CountryEditView *countryEditView;
	BOOL hideedithelp;
	id countyint,countryint;
	NSString *descript,*state;
	Downloader * downloader;
	NSXMLDocument *xmlDoc;
	int updatesize;
	
}



- (void) applicationWillTerminate;
- (void) applicationResume:(struct __GSEvent *) event;
- (void) applicationSuspend:(struct __GSEvent *) event;
+ (MobileVehicleRegPlates *)sharedInstance;

- (void)applicationDidFinishLaunching:(id)unused;
- (void)applicationWillSuspend;

- (void)setUpgradeProgress:(int)p;

- (void) showSearchView;
- (void) hideSearchView;
- (void) showCountries:(int)trans;
- (void) showCountryEdit;
- (void) hideCountryEdit;
- (void) showCounties:(int)trans;
- (void) showDetails:(int)trans;
- (void) hideCountyView;
- (void) setBeforeDetailView:(id)view;
- (void) hideDetailView;
- (void) setCountry:(id)cint;
- (id) getCountry;

- (void) setCounty:(id)cint;
- (id) getCounty;

- (void) setDescription:(NSString*)descr;
- (NSString*) getDescription;

- (void) setState:(NSString*)s;
- (NSString*) getState;

- (void) noNewUpdate:(id)p;
- (void) checkForUpdate:(id)p;

- (void)alertSheet:(UIAlertSheet *)sheet buttonClicked:(int)button;
- (void)showUpdateSheet;
- (void) showUpdateSuccess:(id)param;
- (void) hideUpdateSucess: (id)param;

- (void) setPListParam: (id) param key: (id)keyval;
- (id) getPListParam: (id) key;

- (void) saveHiddenCountries;

- (void)hideUpdateSheet:(id)param;
- (void)dismissUpdateSheet:(int)code;
- (void)showAskUpdateSheet;
- (void)showAboutSheet;
- (void)showWhatsSheet;

@end